package com.oocl.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.oocl.dao.GoodsDao;
import com.oocl.dao.impl.GoodsDaoImpl;
import com.oocl.pojo.Goods;
public class DeleteServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
    private GoodsDao goodsDao;
    public DeleteServlet() {
        super();
        goodsDao = new GoodsDaoImpl();
    }
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String id = request.getParameter("id");
		goodsDao.deleteGoods(id);
		request.getRequestDispatcher("view").forward(request, response);
	}

}
